
var app = getApp();
var util= require("../../utils/libs.js");
var api = require("../../utils/api.js");
Page({
  data: {
     skillList:[],
     id: null,
     uid:""
  },
  onLoad (options) {
    let that = this
    let uid = wx.getStorageSync("uid");
    that.setData({
      uid:uid
    })
    // 页面初始化 options为页面跳转所带来的参数
    that.skillList()
  },
  skillList() {
    let that = this
    util.request(api.Skill,{order:"sort desc"},"GET")
    .then(function (res) {
      if(res.error_code === 0){
        that.setData({
          skillList: res.data.list
        })  
      }
    })
  },
  goDetail(e){
    let id =e.currentTarget.dataset.id
    wx.navigateTo({url:"/pages/article/article?id="+id})
  },
  onReady () {
    // 页面渲染完成
  },
  onShow () {
    // 页面显示
  },
  onHide () {
    // 页面隐藏

  },
  onUnload () {
    // 页面关闭

  }
})
